#include<stdio.h>
int main(){
	float cm=0;
	scanf("%f",&cm);
	float m=cm/100;
	float total=(m/0.3048)*12;
	int a=(int)total;
	int foot=a/12;
	int inch=a%12;
	printf("%d %d",foot,inch);
	return 0;
} 
